Learning TensorFlow by Tom Hope Yehezkel S. Resheff and Itay Lieder

Learning TensorFlow by Tom Hope Yehezkel S. Resheff and Itay Lieder

Author:Tom Hope, Yehezkel S. Resheff, and Itay Lieder
Language: eng
Format: mobi
Publisher: O'Reilly Media, Inc.
Published: 2017-08-16T16:00:00+00:00


The target variable is the median value of owner-occupied homes in thousands of dollars. In this example we try to predict the target variable by using some linear combination of these 13 features.

First, we import the data:

from sklearn import datasets, metrics, preprocessing boston = datasets.load_boston() x_data = preprocessing.StandardScaler().fit_transform(boston.data) y_data = boston.target

Next, we use the same linear regression model as in Chapter 3. This time we track the “loss” so we can measure the mean squared error (MSE), which is the average of the squared differences between the real target value and our predicted value. We use this measure as an indicator of how well our model performs:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.